package com.boot.service;

import com.boot.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * Description:
 *
 * @Autor: Rolin
 * datetime: 05-09-19:44
 */
@FeignClient(value = "seata-account-service")
public interface AccountService {

// 写的操作尽量是采用Post请求的方式进行 编写
    @PostMapping("/account/decrease")
    CommonResult decrease(@RequestParam("userId") Long userId,
                          @RequestParam("money") BigDecimal money);
}
